import java.util.Scanner;
public class 倒着输出数字 {
    public static void main(String args[]) {
        Scanner reader = new Scanner(System.in);
        long number = reader.nextLong();
        String s = new String(Long.toString(number));
        String r = new String("");
        for (int i = s.length() - 1; i >= 0; i--) {
            r += s.toCharArray()[i];
        }
        r = Long.toString(Long.parseLong(r));
        System.out.println(r);
        reader.close();
    }
}
